<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>Login Page</title>
<style>
body
{
  background-color: #000000;
  color:#ffffff; 
  margin:100px;
}

div
{
    border:1px solid white;
    border-radius:10px;
    width: 800px;
    padding:20px;
}

table
{
        font-weight: bold;
    font-size: 26px;
    
}

input[type="text"], input[type="password"]
{
    background-color: #000000;
    border: 1px solid white;
    color: #ffffff;
    width:300px;
    height: 50px;
    font-weight: bold;
    font-size: 26px;
}
input[type="submit"],input[type="reset"]
{
    background-color: #ffffff;
    border: 1px solid white;
    color: #000000;
    font-size: 26px;
    height:50px;
    width:250px;
}
.errorblock {
	color: #ff0000;
	background-color: #ffEEEE;
	border: 3px solid #ff0000;
	padding: 8px;
	margin: 16px;
}
</style>
</head>
<body onload='document.f.j_username.focus();'>
<center>
	<h3>Acesso restrito aos vendedores e administradores da Diplay</h3>
 
	<c:if test="${not empty error}">
		<div class="errorblock">
		        O login falhou! Motivo:
			${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}
		</div>
	</c:if>
        <div>
	<form name='f' action="<c:url value='j_spring_security_check' />"
		method='POST'>
 
		<table>
			<tr>
				<td width="300px">Nome de Usuário:</td>
				<td width="300px"><input type='text' name='j_username' value=''>
				</td>
			</tr>
			<tr>
				<td>Senha:</td>
				<td><input type='password' name='j_password' />
				</td>
			</tr>
			<tr>
				<td>
                                    <input name="submit" type="submit"
					value="Entrar" />
				</td>
                                <td>
                                    <input name="reset" type="reset" value="Limpar" />
				</td>
			</tr>
		</table>
 
	</form>
        </div>
</center>
</body>
</html>
